package liumengbaio.lolzhangyoubao.Activity.Activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;

import liumengbaio.lolzhangyoubao.R;

/**
 * Created by lanouhn on 16/9/7.
 */
public class MenuWallet extends AppCompatActivity implements View.OnClickListener {
    private RelativeLayout relative_diamonds, relative_gold, relative_exchange,
            relative_mytools, relative_indiana, relative_help;
    private Button head_left_title, head_right_title;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.menu_wallet);
        initView();
        initData();
    }

    private void initData() {
        head_left_title.setOnClickListener(this);
        head_right_title.setOnClickListener(this);
        relative_diamonds.setOnClickListener(this);
        relative_gold.setOnClickListener(this);
        relative_exchange.setOnClickListener(this);
        relative_mytools.setOnClickListener(this);
        relative_indiana.setOnClickListener(this);
        relative_help.setOnClickListener(this);
    }

    private void initView() {
        head_left_title = (Button) findViewById(R.id.head_left_title);
        head_right_title = (Button) findViewById(R.id.head_right_title);
        relative_help = (RelativeLayout) findViewById(R.id.relative_help);
        relative_diamonds = (RelativeLayout) findViewById(R.id.relative_diamonds);
        relative_gold = (RelativeLayout) findViewById(R.id.relative_gold);
        relative_exchange = (RelativeLayout) findViewById(R.id.relative_exchange);
        relative_mytools = (RelativeLayout) findViewById(R.id.relative_mytools);
        relative_indiana = (RelativeLayout) findViewById(R.id.relative_indiana);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.relative_diamonds:
                Intent relative_diamonds_intent = new Intent(MenuWallet.this, Diamonds.class);
                startActivity(relative_diamonds_intent);
                break;
            case R.id.relative_gold:
                Intent relative_gold_intent = new Intent(MenuWallet.this, Gold.class);
                startActivity(relative_gold_intent);
                break;
            case R.id.relative_exchange:
                Intent relative_exchange_intent = new Intent(MenuWallet.this, ExchangeActivity.class);
                startActivity(relative_exchange_intent);
                break;
            case R.id.relative_mytools:
                Intent relative_mytools_intent = new Intent(MenuWallet.this, MytoolsActivity.class);
                startActivity(relative_mytools_intent);
                break;
            case R.id.relative_indiana:
                Intent relative_indiana_intent = new Intent(MenuWallet.this, MoreTreasureActivity.class);
                startActivity(relative_indiana_intent);
                break;
            case R.id.relative_help:
                Intent relative_help_intent = new Intent(MenuWallet.this, HelpSay.class);
                startActivity(relative_help_intent);
                break;
            case R.id.head_right_title:
                Intent head_right_title_intent = new Intent(MenuWallet.this, TakeNoteActivity.class);
                startActivity(head_right_title_intent);
                break;
            case R.id.head_left_title:
                finish();
                break;
        }
    }
}
